﻿using Basic.FlowGatewayModule.Interface;
using Basic.FlowRemoteModel.Application;
using Basic.FlowRemoteModel.Application.Model;
using WeDonekRpc.Modular;

namespace Basic.FlowGatewayModule.lmpl
{
    internal class FlowAppAuditService : IFlowAppAuditService
    {
        public CreateAuditResult Create ( CreateAuditArg arg, IUserState state )
        {
            return new CreateAudit
            {
                Datum = arg,
                User = new FlowUser
                {
                    CompanyId = state.ToCompanyId(),
                    EmpId = state.ToEmpId(),
                    DeptId = state.ToDeptId(),
                    UnitId = state.ToUnitId()
                }
            }.Send();
        }
    }
}
